<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ page isELIgnored="false" %>
<html>
<head>
    <title>订单列表</title>
    <script type="text/javascript">
        function searchUser(){
            //alert("dd");
            $("#mainForm").submit();
        }
    </script>
    <style>
        .table-c table{border-right:1px solid #F00;border-bottom:1px solid #F00}
        .table-c table td{border-left:1px solid #F00;border-top:1px solid #F00}
        /* css注释：只对table td标签设置红色边框样式 */
    </style>
</head>
<body>
<div id="main">
    <aside id="left_list" class="lf">
        <ul>
            <li><a href="../order/findUser.do">用户列表</a></li>
            <li><a href="../order/findOrder.do">订单列表</a></li>
        </ul>
    </aside>
    <div id="main_content" class="lf">
        <div class="lf">
            <form id="mainForm" name="mainForm" action="../order/findOrderList.do" method="post">
                <div class="lf"><h5 class="lf">用户名称：</h5><input id="userName" name="userName" class="lf" type="text" <c:if test="${userName!=null}">value="${userName}" </c:if>/></div>
                <div class="lf"><h5 class="lf">用户电话：</h5><input id="userTel" name="userTel" class="lf" type="text" <c:if test="${userTel!=null}">value="${userTel}" </c:if>/></div>
                <div class="lf"><h5 class="lf">订单地址：</h5><input id="orderAddress" name="orderAddress" class="lf" type="text" <c:if test="${orderAddress!=null}">value="${orderAddress}" </c:if>/></div>
                <div class="lf"><input class="lf" type="submit" value="搜索"/></div>
            </form>

        </div>
        <div id="result" class="table-c">
            <table width="100%">
                <tr>
                    <th>订单ID</th>
                    <th>订单编号</th>
                    <th>用户姓名</th>
                    <th>订单地址</th>
                    <th>创建时间</th>
                    <th>是否已经完成</th>
                </tr>
                <c:forEach items="${orderList}" var="order">
                    <tr>
                        <td>${order.orderId}</td>
                        <td>${order.orderNum}</td>
                        <td>${order.user.userName}</td>
                        <td>${order.orderAddress}</td>
                        <td><fmt:formatDate value="${order.orderCreatedate}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></td>
                        <td>${order.isFinish}</td>
                    </tr>
                </c:forEach>
            </table>
            <%--<a href="/user/findUser.do?page=1">首页</a><a href=""></a><a href=""></a><a href=""></a><a href="/user/findUser.do?page=${}">尾页</a>--%>



        </div>
    </div>


</div>

</body>
</html>
